<template>
  <div class="date-picker">
    <h1>date-picker Day 子组件</h1>
    <emDay :value="daydatetime"></emDay>
    <h1>date-picker Month 子组件</h1>
    <emMonth :value="daydatetime" :bodyValue="daydatetime"></emMonth>
    <h1>date-picker year 子组件</h1>
    <emYear :value="daydatetime" :bodyValue="daydatetime"></emYear>
    <h1>父组件 date-picker</h1>

    <p>
      切换date-picker类型 日:<input
        type="radio"
        name="checked"
        v-model="datepickerType"
        value="day"
      />
      月:<input
        type="radio"
        v-model="datepickerType"
        name="checked"
        value="month"
      />
      年:<input
        type="radio"
        v-model="datepickerType"
        name="checked"
        value="year"
      />
    </p>
    <emDatePicker :type="datepickerType"></emDatePicker>
  </div>
</template>

<script>
export default {
  props: {
    innerHTML: Function,
  },
  data() {
    return {
      daydatetime: new Date(),
      datepickerType: "month",
    };
  },
  created() {
    console.log(this.datepickerType);
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.date-picker {
  width: 300px;
}
</style>
